{extend name="apps/common/view/front.tpl" /}
<!-- -->
{block name="header_meta"}
<title>图床上传接口API－{:config('common.site_name')}</title>
<meta name="keywords" content="图床上传接口，图床上传API" />
<meta name="description" content="通过图床上传接口可以将本地电脑或手机里的图片上传至{:config('tuchuang.site_name')}并返回图片的真实地址，可直接用于IMG标签或分享给好友。"  />
{/block}
{block name="header"}{include file="widget/header" /}{/block}
<!--main -->
{block name="main"}
<div class="container pt-2">
  <ol class="breadcrumb mb-2">
    <li class="breadcrumb-item"><a href="{:DcUrl('tuchuang/index/index')}">首页</a></li>
    <li class="breadcrumb-item active">{:config('tuchuang.site_name')}转换接口API</li>
  </ol>
  <div class="card mb-3">
    <div class="card-body">
      <ul class="list-unstyled mb-0">
        <li class="mb-3">请求协议：http/https</li>
        <li class="mb-3">请求方式：post</li>
        <li class="mb-3">返回类型：json</li>
        <li class="mb-3">接口权限：<a href="{:DcUrl('user/group/index')}">我要申请</a></li>
        <li class="mb-3">请求接口：{:DcUrl('tuchuang/apis/upload')}</li>
        <li class="mb-3">请求示例：{:DcUrl('tuchuang/apis/upload',['token'=>DcEmpty($user['user_token'],'登录获取')])}</li>
        <li>接口描述：通过图床上传接口可以将本地图片上传至{:config('tuchuang.site_name')}并以JSON格式返回图片的真实地址，此地址可直接用于IMG标签或分享给好友。</li>
      </ul>
    </div>
  </div>
  <div class="table-responsive mb-3">
    <table class="table table-striped table-bordered mb-0">
      <thead>
        <tr>
          <th>参数名</th>
          <th>类型</th>
          <th class="text-center">必填</th>
          <th>示例值</th>
          <th>描述</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>token</td>
          <td>string</td>
          <td class="text-center">是</td>
          <td>a25bbe798309ffeccf1c26e520528146</td>
          <td>API请求凭证，登录后免费获取。</td>
        </tr>
        <tr>
          <td>file</td>
          <td>string</td>
          <td class="text-center">是</td>
          <td>..........</td>
          <td>文件流上传方式 multipart/form-data</td>
        </tr>
      </tbody>
    </table>
  </div>
  <div class="card">
    <div class="card-header">响应示例</div>
    <div class="card-body">
      <pre class="mb-0" id="json">
      {:json_encode(['code'=>1,'msg'=>'ok','data'=>['slug'=>'134187f0abb0c02ae77d4d66e96a23cd','url'=>'http://image.daicuo.org/datas/attachment/1341/134187f0abb0c02ae77d4d66e96a23cd']])}
      </pre>
    </div>
  </div>
</div>
{/block}
{block name="footer"}{include file="widget/footer" /}{/block}